package picture_circle;

import java.util.Scanner;

public class Circle extends Picture {
    private double centerX;
    private double centerY;
    private double radius;

public Circle(double centerX, double centerY, double radius) {
    this.centerX = centerX;
    this.centerY = centerY;
    this.radius = radius;
}
    @Override
    public double getPerimeter() {
        return 2 * Math.PI * radius;
    }

    @Override
    public double getArea() {
        return Math.PI * radius * radius;
    }

    @Override
    public void show() {
        System.out.println("圆形信息：圆心(" + centerX + ", " + centerY + "), 半径: " + radius);
    }
}

